package com.fengwk.resource.face.client;

import java.util.Collection;
import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.fengwk.resource.face.client.hystrix.FileClientHystrix;
import com.fengwk.resource.face.constant.ResourceConstant;
import com.fengwk.resource.face.model.File;

@FeignClient(
		name = ResourceConstant.FEIGN_CLIENT_NAME, 
		path = "/api/file",
		fallback = FileClientHystrix.class)
public interface FileClient {

	@PostMapping("/getByFileId")
	File getByFileId(@RequestParam(value = "fileId") Long fileId);

	@PostMapping("/listByFileIds")
	List<File> listByFileIds(@RequestParam(value = "fileIds") Collection<Long> fileIds);

	@PostMapping(value = "/getDefaultIcon")
	File getDefaultIcon();
	
}